<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>最美医生留言</title>
    <?php require 'templates/common/head.html'; ?>

    <style type="text/css">
        .divleft{width: 15%; float: left;min-height: 8px; text-align:center; border-right: solid 1px #d5d5d5; margin-right: 1% }
        .divleft2{width: 8%; min-width: 8%;min-height: 10px; float: left; text-align:center; border-right: solid 1px #d5d5d5; margin-right: 0% }
        .divright{ width: 15%; float:right; text-align: center;}
        .divleft3{ width: 10%; float: left; text-align:center;  border-right: solid 1px #d5d5d5; margin-right: 2% }

    </style>

</head>
<body>
<div class="container-fluid">
    <?php require 'templates/common/nav.html'; ?>
    <div class="panel panel-primary">
        <div class="panel-heading text-center"><h3 class="panel-title">最美医生留言</h3></div>
        <div class="panel-body" style="font-size: 18px;">

            <a href="<?=$vote_leave_url?>" type="button" class="btn btn-primary">投票留言</a>
            <form style="display: inline" action="<?=$leave_export_url?>" method="post">
                <input type="hidden" name="id" value="<?=@$_GET['id']?>"/>
                <input type="submit" class="btn btn-primary" value="导出数据"/>
            </form>

        </div>

        <div class="panel-body">
            <div class="panel-group"   id="accordion" role="tablist" aria-multiselectable="true">
                <div class="panel panel-default" >
                    <div class="panel-heading" style="background-color:#d5d5d5" >
                        <div class="row">
                            <div class="col-xs-4 text-justify" style="width:100%;">
                                <div class="divleft2"><b >医生</b></div>
                                <div class="divleft2"><b  >身份</b></div>
                                <div class="divleft2"><b  >联系方式</b></div>
                                <div class="divleft3"><b  >时间</b></div>
                                <div class="divleft"><b  >内容</b></div>

                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <?php if(empty($leave_list)):?>
                     <h4 style="text-align: center; color: red">无数据</h4>
                    <?php endif;?>
                    <?php foreach(@$leave_list as $key => $value):?>
                    <div class="panel-heading"  style=" <?php if($key%2==0){echo "background-color:#DFF0D8;";}else{ echo "border-top: solid 2px #ffffff;";}?>">
                    <div class="row">
                        <div class="col-xs-4 text-justify" style="width:100%;">

                            <div class="divleft2"><span><?= @$value['name'] ?></span></div>



                            <div class="divleft2"><span><?php echo  $value['user_status']==1?'医生':'家长' ?></span></div>
                            <div class="divleft2"><span><?= $value['tel'] ?></span></div>

                            <div class="divleft3"><span><?= @$value['time'] ?></span></div>
                            <div class="divleft"><span><?= $value['content'] ?></span></div>



                        </div>
                    </div>
                </div>
                <?php endforeach; ?>

            </div>
        </div>
    </div>
   <?= @$page->showpage()?>
</div>

</div>

<?php require 'templates/common/foot.html'; ?>

</body>
</html>